﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DocWaterMarker
{
    public enum InterFormat
    {
        JPG,
        PNG
    }

    public static class InterFormatExtension
    {
        public static string Ext(this InterFormat format)
        {
            switch (format)
            {
                default:
                case InterFormat.JPG:
                    return "jpg";
                case InterFormat.PNG:
                    return "png";
            }
        }

        public static System.Drawing.Imaging.ImageFormat Format(this InterFormat format)
        {
            switch (format)
            {
                default:
                case InterFormat.JPG:
                    return System.Drawing.Imaging.ImageFormat.Jpeg;
                case InterFormat.PNG:
                    return System.Drawing.Imaging.ImageFormat.Png;
            }
        }
    }
}
